package com.zjitc;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author 李广彦
 * @date 2020/1/2 20:28
 */
public class First extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String username = req.getParameter("username");
        String pass = req.getParameter("psd");
        String tel = req.getParameter("tel");
        String email = req.getParameter("email");

        resp.sendRedirect("successful.html");
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String usarname = req.getParameter("username");
        String pass = req.getParameter("psd");
        String tel = req.getParameter("tel");
        String email = req.getParameter("email");
        System.out.println(usarname);
        System.out.println(pass);
        System.out.println(tel);
        System.out.println(email);
        resp.sendRedirect("successful.html");
    }
}
